﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="AccordingToProductTypeRecords.aspx.cs" Inherits="WXYW.AccordingToProductTypeRecords" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    按产品型号
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
    关键字<asp:TextBox ID="keyWordTextBox" runat="server" Height="16px" onkeypress="enterTxtBox('searchLinkButton')"></asp:TextBox>
    <asp:LinkButton ID="searchLinkButton" runat="server" OnClick="searchLinkButton_Click">查询</asp:LinkButton>
    <asp:LinkButton ID="resetLinkButton" runat="server" OnClick="resetLinkButton_Click">清除</asp:LinkButton>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <asp:GridView ID="productTypeGridView" runat="server" CssClass="tableList" BorderWidth="1"
        BorderColor="#888888" AutoGenerateColumns="false" AllowPaging="true" PageSize="20"
        Width="100%" OnPageIndexChanging="productTypeGridView_PageIndexChanging" OnRowDataBound="productTypeGridView_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="物料号" DataField="MaterialID" />
            <asp:TemplateField HeaderText="类别">
                <ItemTemplate>
                    <%#Eval("ProductClass.Name") %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="型号" DataField="ModelNumber" />
            <asp:BoundField HeaderText="版本" DataField="VersionNumber" />
            <asp:BoundField HeaderText="保修期限" DataField="RepairPeriod" />
            <asp:BoundField HeaderText="描述" DataField="Description" />
            <asp:BoundField HeaderText="自研/非自研" DataField="Property" />
            <asp:BoundField HeaderText="返修次数" DataField="RepairTimes" />
            <asp:TemplateField HeaderText="代理商">
                <ItemTemplate>
                    <%#Eval("Provider.ProviderName") %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <img src="image/operateicon/docview.gif" />
                    <asp:LinkButton ID="viewLinkButton" OnClick="viewLinkButton_click" CommandArgument='<%#Eval("ProductID") %>'
                        runat="server">查看</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerTemplate>
            本类记录<span style="color: Red"><%= RecordsNumber%></span>条, <span style="color: Red">20</span>条/页
            当前 <span style="color: Red">
                <%= productTypeGridView.PageIndex + 1%>/<%= productTypeGridView.PageCount%></span>页
            <asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server"
                Style="color: blue">首页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Prev"
                    ID="LinkButton2" runat="server" Style="color: blue">|上一页</asp:LinkButton>
            <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server"
                Style="color: blue">下一页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Last"
                    ID="LinkButton4" runat="server" Style="color: blue">|尾页</asp:LinkButton>
            转到<asp:DropDownList ID="pageDDL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="pageDDL_SelectedIndexChanged">
            </asp:DropDownList>
        </PagerTemplate>
    </asp:GridView>
</asp:Content>
